package com.itheima.myreflect2.Student.convertedio;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

/**
 * @program: Myset
 * @description:对象操作输入流
 * @author: xuejingjing
 * @create: 2021-06-16 10:38
 **/
public class ConbertedDemo4 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {

        //字节输入流,输入到内存中  ----读对象  反序列化
        ObjectInputStream obs = new ObjectInputStream(new FileInputStream("d.txt"));
        User o = (User)obs.readObject();
        System.out.println(o);
        obs.close();
    }
}
